﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using OgilvyOne.BLL;

public partial class DataBaseManage_LogDelete : AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.headers.Text = new ColumnBll().LayeridSysColumnNaiv(Layerid);//系统
            string url = "log_delete.aspx?layerid=" + Request.Params["layerid"];
            this.headers.Text += "<img src='../images/subnav_dot.gif' width='9' height='9' />&nbsp;&nbsp;<a href='" + url + "'>日志删除</a>&nbsp;&nbsp";
        }
    }
    protected void del_Click(object sender, EventArgs e)
    {
        string layerid = Request["layerid"];
        PopedomValidate(layerid, DEL);
        if (this.starttime.Text == "" )
        {
            ClientScript.RegisterStartupScript(this.GetType(), "logdel", "<script language='javascript'>alert('请输入开始时间!')</script>");
            return;
        }
        if (this.endtime.Text == "")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "logdel", "<script language='javascript'>alert('请输入结束时间!')</script>");
            return;
        }
        new LogManageBLL().Del(this.starttime.Text, this.endtime.Text);
        ClientScript.RegisterStartupScript(this.GetType(), "logdel", "<script language='javascript'>alert('成功删除!');location.href='log_Manage.aspx?layerid=" + Request.Params["layerid"]+"';</script>");
       // Response.Redirect("log_Manage.aspx?layerid=" + Request.Params["layerid"], true);
        return;
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("log_Manage.aspx?layerid=" + Request.Params["layerid"]);
        return;
    }
}
